//
//  BaseTableView.h
//  ArtDog
//
//  Created by dllo on 16/8/29.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import <UIKit/UIKit.h>
@class TableViewReturnParam;

NS_ASSUME_NONNULL_BEGIN

typedef void(^CellForRowAtIndexPath)(UITableView *tableView, NSIndexPath *indexPath, TableViewReturnParam *tableViewParam);
typedef void(^NumberOfSection)(UITableView *tableView, TableViewReturnParam *tableViewParam);
typedef void(^NumberOfRow)(UITableView *tableView, TableViewReturnParam *tableViewParam);
typedef void(^HeightForRowAtIndexPath)(UITableView *tableView, NSIndexPath *indexPath, TableViewReturnParam *tableViewParam);
typedef void(^DidSelectRowAtIndexPath)(UITableView *tableView, NSIndexPath *indexPath);

@interface BaseTableView : UITableView<UITableViewDelegate, UITableViewDataSource>

- (void)tableViewWithNumberOfSection:(NumberOfSection)numberOfSection andNumberOfRow:(NumberOfRow)numberOfRow andCellForRowAtIndexPath:(CellForRowAtIndexPath)cellForRowAtIndexPath andHeightForRowAtIndexPath:(HeightForRowAtIndexPath)heightForRowAtIndexPath andDidSelectRowAtIndexPath:(DidSelectRowAtIndexPath)didSelectRowAtIndexPath;

- (void)tableViewWithNumberOfRow:(NumberOfRow)numberOfRow andCellForRowAtIndexPath:(CellForRowAtIndexPath)cellForRowAtIndexPath andHeightForrowAtIndexPath:(HeightForRowAtIndexPath)heightForRowAtIndexPath andDidSelectRowAtIndexPath:(DidSelectRowAtIndexPath)didSelectRowAtIndexPath;

- (void)tableViewWithNumberOfRow:(NumberOfRow)numberOfRow andCellForRowAtIndexPath:(CellForRowAtIndexPath)cellForRowAtIndexPath andHeightForrowAtIndexPath:(HeightForRowAtIndexPath)heightForRowAtIndexPath;


@end

@interface TableViewReturnParam : NSObject

@property (nonatomic, assign) NSInteger numberOfSection;
@property (nonatomic, assign) NSInteger numberOfRow;
@property (nonatomic, assign) CGFloat heightAtRow;
@property (nonatomic, strong, nullable) UITableViewCell *returnCell;



@end
NS_ASSUME_NONNULL_END

